<?php $order_class = array(2=>'arrow-black-up', 1=>'arrow-black-down');?>
<ul class="result-output-menu">
	<?php $selected=0; $order = 2; if($this->sort_info['order_field'] == 'is_with_photo') {$selected=1;$order = ($this->sort_info['order'] == 2) ? 1 : 2;}?>
	<li class="result-output-photo first">
	    <a title="Сортировать автомобили по фотографиям" href="<?= $this->qurl(array('order_field'=>'photo', 'order'=>$order, 'q_id'=>$this->q_id));?>"
            <?php if($selected): ?> class="active-el-menu"  <?php endif;?>> Фото <span class="arrow-small <?=$order_class[$order]; ?>"></span>
        </a>
    </li>
	
	<li class="result-output-info"><span class="output-menu-span">Информация</span></li>
	
	<?php $selected=0; $order = 1; if($this->sort_info['order_field']=='years') {$selected=1;$order = ($this->sort_info['order'] == 1) ? 2 : 1;}?>
	<li class="result-output-date">
	    <a title="Сортировать по году выпуска авто" href="<?= $this->qurl(array('order_field'=>'years', 'order'=>$order , 'q_id'=>$this->q_id));?>"
            <?php if($selected): ?> class="active-el-menu" <?php endif;?>> Год выпуска <span class="arrow-small <?=$order_class[$order]; ?>"></span>
        </a>
    </li>

        <?php $selected=0; $order = 1; if($this->sort_info['order_field']=='mileage') {$selected=1;$order = ($this->sort_info['order'] == 1) ? 2 : 1;}?>
	<li class="result-output-mileage">
	    <a title="Сортировать по пробегу авто" href="<?= $this->qurl(array('order_field'=>'mileage', 'order'=>$order, 'q_id'=>$this->q_id));?>"
    	   <?php if($selected): ?> class="active-el-menu" <?php endif;?>> Пробег <span class="arrow-small <?=$order_class[$order]; ?>"></span>
        </a>
    </li>

	<?php $selected=0; $order = 1; if($this->sort_info['order_field']=='price') {$selected=1;$order = ($this->sort_info['order'] == 1) ? 2 : 1;}?>
	<li class="result-output-price">
	    <a title="Сортировать по цене" <?php if($selected==1): ?>class="active-el-menu" <?php endif;?> href="<?= $this->qurl(array('order_field'=>'price', 'order'=>$order , 'q_id'=>$this->q_id)); ?>">Цена <span class="arrow-small <?=$order_class[$order]; ?>"></span>
        </a>
    </li>
	
</ul>
